<template>
  <div class="reservation">
    <header-top>
      <a class="header_left" slot="left" @click="$router.back()">
        <img src="../../assets/images/icon_fanhui.png"/>
      </a>
      <a class="header_center" slot="center">
        <span>我的预约</span>
      </a>
    </header-top>
    <div class="reservation_content_list">
      <div class="reservation_content_header">
        <flexbox>
          <flexbox-item :span="6" @click.native="active='near'">
            <div class="reservation_content_header_item" :class="{active: active=='near'}">
              近期预约
            </div>
            <p v-show="active=='near'"></p>
          </flexbox-item>
          <img src="../../assets/images/bg_fengexian2.png" style="height: 36px;"/>
          <flexbox-item :span="6" @click.native="active='past'">
            <div class="reservation_content_header_item" :class="{active: active=='past'}">
              以往预约
            </div>
            <p v-show="active=='past'"></p>
          </flexbox-item>
        </flexbox>
      </div>
      <div class="reservation_content reservation_content_first">
        <flexbox>
          <flexbox-item :span="10">
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">美发店</p>
              <p class="reservation_content_item_p2">经典龙华店</p>
            </div>
          </flexbox-item>
          <flexbox-item :span="1">
            <div class="reservation_content_img">
              <img src="../../assets/images/btn_jiantou.png"/>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item :span="10">
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">美发套餐</p>
              <p class="reservation_content_item_p2">￥35 洗剪吹1次，男女不限，发长不限</p>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item :span="10">
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">发型师</p>
              <p class="reservation_content_item_p2">诸葛亮</p>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item :span="10">
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">地点</p>
              <p class="reservation_content_item_p2">深圳市龙华新区民治大道上油松村</p>
            </div>
          </flexbox-item>
          <flexbox-item :span="1">
            <div class="reservation_content_img">
              <img src="../../assets/images/btn_jiantou.png"/>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item :span="10">
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">电话</p>
              <p class="reservation_content_item_p2">0753-3456789</p>
            </div>
          </flexbox-item>
          <flexbox-item :span="1">
            <div class="reservation_content_img">
              <img src="../../assets/images/btn_jiantou.png"/>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item :span="10">
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">到店时间</p>
              <p class="reservation_content_item_p2">今天04月26日 上午09:00至12:00前</p>
            </div>
          </flexbox-item>
        </flexbox>
      </div>
      <div class="reservation_content reservation_content_second">
        <flexbox>
          <flexbox-item :span="10">
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">美发店</p>
              <p class="reservation_content_item_p2">经典龙华店</p>
            </div>
          </flexbox-item>
          <flexbox-item :span="1">
            <div class="reservation_content_img">
              <img src="../../assets/images/btn_jiantou.png"/>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item>
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">美发套餐</p>
              <p class="reservation_content_item_p2">￥35 洗剪吹1次，男女不限，发长不限</p>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item :span="10">
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">发型师</p>
              <p class="reservation_content_item_p2">诸葛亮</p>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item :span="10">
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">地点</p>
              <p class="reservation_content_item_p2">深圳市龙华新区民治大道上油松村</p>
            </div>
          </flexbox-item>
          <flexbox-item :span="1">
            <div class="reservation_content_img">
              <img src="../../assets/images/btn_jiantou.png"/>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item :span="10">
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">电话</p>
              <p class="reservation_content_item_p2">0753-3456789</p>
            </div>
          </flexbox-item>
          <flexbox-item :span="1">
            <div class="reservation_content_img">
              <img src="../../assets/images/btn_jiantou.png"/>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"/>
        <flexbox>
          <flexbox-item :span="10">
            <div class="reservation_content_item">
              <p class="reservation_content_item_p1">到店时间</p>
              <p class="reservation_content_item_p2">今天04月26日 上午09:00至12:00前</p>
            </div>
          </flexbox-item>
        </flexbox>
      </div>
    </div>
  </div>
</template>

<script>
  import {Flexbox, FlexboxItem} from 'vux'
  import HeaderTop from '../../components/HeaderTop/HeaderTop'

  export default {
    name: "Reservation",
    components: {
      HeaderTop,
      Flexbox,
      FlexboxItem
    },
    data() {
      return {
        active: 'past'
      }
    }
  }
</script>

<style scoped>
  .reservation_content_list {
    margin-top: 48px;
    margin-bottom: 10px;
  }

  .reservation_content_header {
    margin: 10px 10px 0 10px;
    margin-top: 58px;
    background-color: #fff;
    border: 1px solid #ffdccd;
    border-bottom: none;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
  }

  .reservation_content_header_item {
    margin: 15px 0;
    text-align: center;
    font-size: 15px;
    color: #a0a0a0;
  }

  .active {
    color: #ff6633;
  }

  .reservation_content_header p {
    height: 4px;
    margin: -4px 30px 0 30px;
    background: #ff6633;
  }

  .reservation_content {
    margin: 0 10px;
    background-color: #fff;
    border: 1px solid #ffdccd;
    border-radius: 3px;
  }

  .reservation_content_first {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  .reservation_content_second {
    margin-top: 10px;
  }

  .reservation_content_item {
    margin: 10px 0 10px 15px;
    height: 40px;
  }

  .reservation_content_img img {
    width: 9px;
    height: 15px;
    position: absolute;
    right: 30px;
    margin-top: -8px;
  }

  .reservation_content_item_p1 {
    font-size: 14px;
    color: #a0a0a0;
  }

  .reservation_content_item_p2 {
    font-size: 16px;
    color: #333333;
    margin-top: 10px;
  }
</style>
